def count_word_frequency(text):
    # 去除标点符号并转换为小写
    for char in ",.!?;:":
        text = text.replace(char, " ")
    text = text.lower()

    # 分割文本为单词列表
    words = text.split()

    # 统计词频
    word_count = {}
    for word in words:
        word_count[word] = word_count.get(word, 0) + 1

    # 按词频从高到低排序
    sorted_word_count = dict(sorted(word_count.items(), key=lambda x: x[1], reverse=True))
    return sorted_word_count


# 测试样例
text = "To be or not to be, that is the question."
print(count_word_frequency(text))
